<?php
include($_SERVER["DOCUMENT_ROOT"] . "/bob.php");
//include($_SERVER["DOCUMENT_ROOT"] . "/fonctions_mysqli.php");
include($_SERVER["DOCUMENT_ROOT"] . "/fonctions_globales.php");

$mysqli = new_mysqli($host, $user, $password, $database); //connection à la DB
$variable_get = filter_input_array(INPUT_GET);

$rqt_username = "SELECT user_id FROM gens WHERE LOWER(username)=LOWER('".trim($mysqli->real_escape_string($variable_get['pseudo']))."')";
$result=  mysqli_query_with_error($mysqli, $rqt_username);
if ($result->num_rows>0){
    echo 'Existant';
}else{
    echo 'OK';
}

